//package com.ezsoft.service;
//
//import javax.annotation.PostConstruct;
//import javax.sql.DataSource;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.jdbc.core.JdbcTemplate;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Propagation;
//import org.springframework.transaction.annotation.Transactional;
//
///**
//* @author gujianhua
//* @version 创建时间：2018年6月30日 下午1:30:58
//* 类说明
//*/
//
//@Service
//@Transactional
//public class ServiceClass {
//    @Autowired
//    private DataSource dataSource; 
//    private JdbcTemplate jdbcTemplate;
//    public DataSource getDataSource() {
//        return dataSource;
//    }
//    public void setDataSource(DataSource dataSource) {
//        this.dataSource = dataSource;
//    }
//    
//    
//    @PostConstruct
//    public void init() {
//        System.out.println("初始化jdbcTemplate");
//        this.jdbcTemplate=new JdbcTemplate(dataSource);
//    }
//    
//    @Transactional(propagation=Propagation.REQUIRED)
//    public void save() {
//        jdbcTemplate.update("insert into spring ");
//    }
//    
//}
